﻿using System;
using System.Linq;

namespace Ex6ExtensionAndLinq
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] arr = new int[100];
            for (int i = 0; i < arr.Length; i++)
            {
                arr[i] = i;
            }

            arr.AsParallel().Where(x => x % 21 == 0).ForAll(x => Console.WriteLine(x));

            var result =
                from num in arr
                where num % 21 == 0
                select num;

            Console.WriteLine();
            foreach (var num in result)
            {
                Console.WriteLine(num);
            }
        }
    }
}
